package com.jt.www.enums.extend;

import org.apache.commons.lang.StringUtils;

/**
 * 方案对应基本保费
 */

public enum ProgrameBasicPremEnum {

    M_19FA329228("19FA329228", "12", "山西省校方责任保险(太原)"),
    A_19FA263026("19FA263026", "8", "山西省附加校方无过失责任保险(太原)"),
    M_19FA250142("19FA250142", "6", "山西省校方责任保险"),
    A_19FA443532("19FA443532", "4", "山西省附加校方无过失责任保险");

    /**
     * 方案编码
     */
    private String programeCode;

    /**
     * 基本保费
     */
    private String prem;

    /**
     * 描述
     */
    private String desc;

    ProgrameBasicPremEnum(String programeCode, String prem, String desc) {
        this.programeCode = programeCode;
        this.prem = prem;
        this.desc = desc;
    }

    public static String getPremByProgrameCode(String programeCode) {
        if (StringUtils.isBlank(programeCode)) {
            return "0";
        }
        for (ProgrameBasicPremEnum programeBasicPremEnum : ProgrameBasicPremEnum.values()) {
            if (programeBasicPremEnum.programeCode.equals(programeCode)) {
                return programeBasicPremEnum.prem;
            }
        }
        return "0";
    }

    public String getProgrameCode() {
        return programeCode;
    }

    public String getPrem() {
        return prem;
    }

    public String getDesc() {
        return desc;
    }
}
